// index.js
// 获取应用实例
const app = getApp()

Page({
  data: {
    info: 'Hello Word',
    imgSrc: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2F1113%2F032120114622%2F200321114622-4-1200.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1651244813&t=bb8dfd497919d06b1a2f367f10350ac6',
    num: Math.random() * 10,
    num2: Math.random().toFixed(2),
    count: 0,
    count2: 0,
    msg:'你好'
  },
  btn(e) {
    console.log(e);
  },
  btn2() {
    this.setData({
      count: this.data.count + 1
    })
  },
  btn3(e) {
    this.setData({
      count2: this.data.count2 + e.target.dataset.info
    })
    // console.log(e);
  },
  ipt(e) {
    console.log(e.detail.value);
  },
  ipt2(e) {
    this.setData({
      msg:e.detail.value
    })
  }
})